/********************************************************/
/*	Copyright (C) 2016 Gong Li Bin			*/
/*	Project:	GlbCloud			*/
/*	Author:		gong_libin			*/
/*	Date:		2012_01_09			*/
/*	File:		MrThread.h			*/
/********************************************************/

#ifndef _MRTHREAD_H
#define	_MRTHREAD_H

#include "MrGlobal.h"
#include <pthread.h>

class CMrThread
{
public:
	CMrThread();
	virtual ~CMrThread();

	int MrThreadDestroy();
	int MrThreadAttrInit();
	int MrThreadAttrSetDetach();
	int MrThreadCreate(void* pPara);
	int MrThreadJoin(void** ppReturn);
	void MrThreadAttrSet(void* pAttr);
	void MrThreadSetStartRoutine(void* (*pStartRoutine)(void*));

private:
	pthread_t m_iID;
	pthread_attr_t m_stAttr;
	void* (*m_pStartRoutine)(void*);

};

#endif /* _MRTHREAD_H */
